<template>
  <div id="gd11x5Page" class="view">
    <game-header :caipiaoTerm='caipiaoTermCon' :caipiaoName='caipiaoName'></game-header>
    <el-tabs type="border-card" v-model="activeName" @tab-click='changeTab'>
      <el-tab-pane v-for="item in gameArr" :key="item.order" :label="item.backup1" :name="item.order">
        <el-tabs  v-model="activeName2">
          <el-tab-pane v-for="p in item.children" :key="p.order2" :label="p.name" :name="p.order2">
            <component :is="p.myTab" :caipiaoTerm='caipiaoTermCon' :childArr = "p"></component>
          </el-tab-pane>
        </el-tabs>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
  import header from '../../gamesub/header'
  import nav from '../../gamesub/nav'
  import rxfs from './play/rxfs'
  import dwd from './play/dwd'
  import bdw from './play/bdw'
  import em from './play/em'
  import sm from './play/sm'
  import rxds from './play/rxds'
  import rxtd from './play/rxtd'
  export default {
    data () {
      return {
      	caipiaoName: '广东11选5',
        activeName: '0',
        activeName2: '0',
        caipiaoTerm: 1,
        caipiaoTermCon: 2123123123,
        ticketId: 41,
        gameArr: []
      }
    },
    created () {
    	let arr = this.$store.state.allGameList
    	arr.forEach(item => {
    		if(item.ticketId === this.ticketId) {
    			this.gameArr = item.list
    		}
    	})
    	console.log(this.gameArr)
    },
    methods: {
      changeTab () {
    		this.activeName2 = "0"
    	}
    },
    components: {
      'game-header': header,
      'game-nav': nav,
      'my-rxfs': rxfs,
      'my-dwd': dwd,
      'my-bdw': bdw,
      'my-em': em,
      'my-sm': sm,
      'my-rxds': rxds,
      'my-rxtd': rxtd
    }
  }
</script>

<style lang="less">
    #gd11x5Page{
    /*border:1px solid #ccc;*/
    .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{
      background-color: #f13131;
      color: white;
    }
    .content {
      background-color: #fff;
      border-bottom: 1px solid #ddd;
    }

    }
</style>
